<?php

namespace beObject\MVC;

use beObject\MVC\Model;

/**
 * This interface force to implements persistance methods.<br />
 * These are Create, Retrieve, Update and Delete.
 * @author Dany Mottier
 * @copyright MD Consult
 * @license http://www.gnu.org/licenses/gpl.html
 * @link http://www.beobject-framework.net/beobject/mvc/interfaces/crud-interface/<br />
 * @package beObject\MVC
 * @version 3.0
 */
interface iCRUD {

  /**
   * This function is the pattern to create a persistance of the object.
   * @param \beObject\MVC\Model $model The model to create.
   * @link http://www.beobject-framework.net/beobject/mvc/interfaces/crud-create/
   */
  static function create(Model $model);

  /**
   * This function is the pattern to retrieve a persistance of the object.
   * @param \beObject\MVC\Model $model The model to create.
   * @link http://www.beobject-framework.net/beobject/mvc/interfaces/crud-retrieve/
   */
  static function retrieve(Model $model);

  /**
   * This function is the pattern to update a persistance of the object.
   * @param \beObject\MVC\Model $model The model to create.
   * @link http://www.beobject-framework.net/beobject/mvc/interfaces/crud-update/
   */
  static function update(Model $model);

  /**
   * This function is the pattern to delete a persistance of the object.
   * @param \beObject\MVC\Model $model The model to create.
   * @link http://www.beobject-framework.net/beobject/mvc/interfaces/crud-delete/
   */
  static function delete(Model $model);
}

?>
